package com.ruoyi.lxzx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lxzx.mapper.GroupNotificationMapper;
import com.ruoyi.lxzx.domain.GroupNotification;
import com.ruoyi.lxzx.service.IGroupNotificationService;

/**
 * 老乡圈通知Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-26
 */
@Service
public class GroupNotificationServiceImpl implements IGroupNotificationService 
{
    @Autowired
    private GroupNotificationMapper groupNotificationMapper;

    /**
     * 查询老乡圈通知
     * 
     * @param id 老乡圈通知主键
     * @return 老乡圈通知
     */
    @Override
    public GroupNotification selectGroupNotificationById(Long id)
    {
        return groupNotificationMapper.selectGroupNotificationById(id);
    }

    /**
     * 查询老乡圈通知列表
     * 
     * @param groupNotification 老乡圈通知
     * @return 老乡圈通知
     */
    @Override
    public List<GroupNotification> selectGroupNotificationList(GroupNotification groupNotification)
    {
        return groupNotificationMapper.selectGroupNotificationList(groupNotification);
    }

    /**
     * 新增老乡圈通知
     * 
     * @param groupNotification 老乡圈通知
     * @return 结果
     */
    @Override
    public int insertGroupNotification(GroupNotification groupNotification)
    {
        groupNotification.setCreateTime(DateUtils.getNowDate());
        return groupNotificationMapper.insertGroupNotification(groupNotification);
    }

    /**
     * 修改老乡圈通知
     * 
     * @param groupNotification 老乡圈通知
     * @return 结果
     */
    @Override
    public int updateGroupNotification(GroupNotification groupNotification)
    {
        groupNotification.setUpdateTime(DateUtils.getNowDate());
        return groupNotificationMapper.updateGroupNotification(groupNotification);
    }

    /**
     * 批量删除老乡圈通知
     * 
     * @param ids 需要删除的老乡圈通知主键
     * @return 结果
     */
    @Override
    public int deleteGroupNotificationByIds(Long[] ids)
    {
        return groupNotificationMapper.deleteGroupNotificationByIds(ids);
    }

    /**
     * 删除老乡圈通知信息
     * 
     * @param id 老乡圈通知主键
     * @return 结果
     */
    @Override
    public int deleteGroupNotificationById(Long id)
    {
        return groupNotificationMapper.deleteGroupNotificationById(id);
    }
}
